package com.neu.fenli2023623.service.impl;

import com.neu.fenli2023623.entity.FeeDetails;
import com.neu.fenli2023623.entity.ZyInformation;
import com.neu.fenli2023623.entity.Zyxf;
import com.neu.fenli2023623.mapper.ZyInformationMapper;
import com.neu.fenli2023623.mapper.ZyxfMapper;
import com.neu.fenli2023623.service.ZyxfService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;
@Service
public class ZyxfServiceImpl implements ZyxfService {
    @Autowired
    private ZyxfMapper zyxfMapper;
    @Autowired
    private ZyInformationMapper zyInformationMapper;
    @Override
    public List<Map<String, Object>> selectAll() {
        return zyxfMapper.selectAll();
    }
    @Override
    public List<Map<String, Object>> selectByDateRangeOrPatient(String startDate, String endDate, String patientName, String cardNumber,String zyId) {
        endDate =endDate+" 23:59:59";
        return zyxfMapper.selectByDateRangeOrPatient(startDate, endDate,patientName, cardNumber,zyId);
    }

    @Override
    public int updateAddNote(Zyxf record) {
        return zyxfMapper.updateAddNote(record);
    }

    @Override
    public List<FeeDetails> selectProjectDetails(String zy_order_id) {
        return zyxfMapper.selectProjectDetails(zy_order_id);
    }

    @Override
    public List<ZyInformation> selectZyInformation(String zyId) {
        return zyInformationMapper.selectZyInformation(zyId);
    }
}
